home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 April
/
EnigmA AMIGA RUN 06 (1996)(G.R. Edizioni)(IT)[!][issue 1996-04][Skylink CD V].iso
/
progs
/
editor
/
write-ed
/
rexx
/
autodoc.wrx
next >
Wrap
Text File
|
1995-05-01
|
2KB
|
98 lines
/** $VER: Autodoc.ttx 1.0 (5.Aug.91)
** Written by David N. Junod
**
** Display hypertext Autodoc page.
**
** Add the following lines to your S:user-startup file.
**
** RX "AddLib('amigaguide.library',0,-30)"
** RX "LoadXRef('autodocs.xref')"
**
** 23/09/93 - adapted for the WRITE editor by MGR, Asgard - Lars Hanke
** 07/02/94 - eliminated AmigaGuide programs calls and replaced them by
** amigaguide.library calls.
**
**/
OPTIONS RESULTS
IF ~SHOW('P','WRITE') then
do
say "This script is for use with the WRITE editor"
say "Use AUTODOC.REXX from CLI."
exit 0
end
address 'WRITE'
'VERSIONCHECK 40000 "autodoc.wrx"'
IF RC~=0 THEN DO
exit 10
END
'GetVar (_CurrentWord)'
word = RESULT
err = RC
do while ((word = "RESULT") & (err = 0))
'CursorLeft 0'
err = RC
'GetVar (_CurrentWord)'
word = RESULT
end
if err ~= 0 then
do
'MessageOK (You must have a word in the active window!)'
exit 0
end
'GetVar (_FilePath)'
path = RESULT
call pragma(DIRECTORY,path)
IF ~SHOW('L','amigaguide.library') THEN
CALL ADDLIB('amigaguide.library',0,-30)
/* See if the Autodoc cross-reference table is loaded */
line = GetXRef("OpenWindow()")
IF line = 10 THEN DO
/* The Autodoc table wasn't loaded, so load it. */
call LoadXRef(autodocs.xref)
END
/* See if the word is in the cross-reference table */
function = word
xref = 0
line = GetXRef(function)
IF line = 10 THEN DO
/* Add the parens to the name */
function = word||"()"
/* Try again */
line = GetXRef(function)
IF line = 10 THEN DO
function = word
END
ELSE DO
xref = 1
END
END
ELSE DO
xref = 1
END
if line ~= 10 then
do
parse var line node file xref offset
node = compress(node,'"')
file = compress(file,'"')
call ShowNode(,file,node,offset,xref)
end
else do
cmd = "run MultiView "||function
ADDRESS COMMAND cmd
END